package cn.com.api.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;

import cn.com.api.entity.ApiT_order_detail;
import cn.com.api.mapper.base.T_order_detailMapperBase;

//DAO
public interface ApiT_order_detailMapper extends T_order_detailMapperBase {

	// 新增对象后返回记录ID
	public int T_order_detailInsertion(ApiT_order_detail t_order_detail);

	public ApiT_order_detail findOrderDetailsByMap(Map<String, Object> map);

	public void batchInsertOrderDetail(List<ApiT_order_detail> list);

	public List<Map<String, Object>> getOrderDetailByOrderNum(final String orderNum);

	public List<ApiT_order_detail> getOrderDetailBySerialFlagNo(final String serialFlagNo);

	@Insert("INSERT INTO T_ORDER_DETAIL (DID, MONEY, NUM, TARGET_ID, PRODUCT_ID,POINTS, EXT_1, EXT_2, EXT_3, EXT_4, EXT_5) VALUES (#{did, jdbcType=VARCHAR}, #{money, jdbcType=VARCHAR}, #{num, jdbcType=VARCHAR}, #{target_id, jdbcType=VARCHAR}, #{product_id, jdbcType=VARCHAR},  #{points, jdbcType=VARCHAR}, #{ext_1, jdbcType=VARCHAR}, #{ext_2, jdbcType=VARCHAR}, #{ext_3, jdbcType=VARCHAR}, #{ext_4, jdbcType=VARCHAR}, #{ext_5, jdbcType=VARCHAR})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public void insertT_order_detail_info(ApiT_order_detail apiT_order_detail);

}
